package jmine.tec.web.servlet;

import java.io.IOException;
import java.io.OutputStream;

import javax.servlet.ServletOutputStream;

/**
 * Extende {@link ServletOutputStream} com um delegate
 * 
 * @author takeshi
 */
public class FilterServletOutputStream extends ServletOutputStream {

    private final OutputStream delegate;

    /**
     * @param delegate {@link OutputStream}
     */
    public FilterServletOutputStream(OutputStream delegate) {
        this.delegate = delegate;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void write(int b) throws IOException {
        delegate.write(b);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void write(byte[] b, int off, int len) throws IOException {
        delegate.write(b, off, len);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void flush() throws IOException {
        delegate.flush();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void close() throws IOException {
    }

}
